# n = int(input("请输入正整数:"))
# num = 0
# for i in range(0,n):
#     if n % i == 0:
#         print("不是素数")
#         break
# else:
#     print("是素数")

n = int(input("请输入正整数:"))
num = 0
for i in range(2, n):
    for j in range(2,i):
        if i % j == 0:
            break
    else:
        num += 1
        print(i,"是一个素数")
print(f"共有{num}个素数")
